﻿<%@ Page Language="C#" MasterPageFile="~/Design/MasterPage/MasterPage.master" AutoEventWireup="true" CodeFile="MenuInfoForm.aspx.cs" Inherits="App_Input_MenuInfoForm" Title="菜单信息" %>

<%@ Register Assembly="ShpmCommon" Namespace="Shpm.System.Web.Control" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/jscript">
function getWeek()
   {
   var date=window.document.getElementById('<%=txtDate.ClientID%>').value;
   var d=new initArray( 
"星期日", 
"星期一", 
"星期二", 
"星期三", 
"星期四", 
"星期五", 
"星期六");



 var today =new Date(date); 
 if(isNaN(today))
 {
 window.document.getElementById('<%=Label1.ClientID%>').innerText="";

 return;
 }
 window.document.getElementById('<%=Label1.ClientID%>').innerText=d[today.getDay()+1];
 window.document.getElementById('<%=hidWeek.ClientID%>').value=d[today.getDay()+1];

   
   
   }
   
   function initArray(){ 
        this.length=initArray.arguments.length 
        for(var i=0;i<this.length;i++) 
        this[i+1]=initArray.arguments[i]
   } 
</script>
    <table class="table_border_line">
        <tr>
            <th colspan="5" align="left" style="text-align: left;">

                <script language="javascript">
        (new TitleBar('SearchBar', '菜肴信息')).showBar();
                </script>

            </th>
        </tr>
        <tr>
        <td style="height:20px;"></td>
        </tr>
        <tr>
            <td style="width: 29px; text-align:right;">
                <span style="color: #ff7300">*</span></td>
            <td style="width: 66px;">
                订餐日期</td>
            <td style="width: 124px;">
                <asp:TextBox ID="txtDate" runat="server" MaxLength="10" onfocus="new Calendar().show(this);"
                    Width="97px" onpropertychange="getWeek()" ></asp:TextBox></td>
            <td style="width: 71px;">
                <asp:Label ID="Label1" runat="server"></asp:Label></td>
            <td>
            </td>
        </tr>
        <tr>
            <td style="width: 29px; height: 30px">
            </td>
            <td style="width: 66px; height: 30px">
                菜单时间</td>
            <td style="width: 124px; height: 30px">
                <asp:DropDownList ID="DrpTime" runat="server" DataTextField="Content" DataValueField="DictNo"
                    Width="97px">
                </asp:DropDownList></td>
            <td style="width: 71px; height: 30px">
                <asp:Button ID="btnSeach" runat="server" CssClass="button" OnClick="btnSeach_Click"
                    Text="检 索" Width="100%" /></td>
            <td style="height: 30px">
            </td>
        </tr>
    </table>
    <br />
    <table class="table_border_line">
        <tr>
            <td colspan="5" style="text-align:center;">
                <asp:Label ID="LabDate" runat="server" Font-Bold="True" Font-Italic="False" Font-Overline="False"
                    Font-Size="12pt" Font-Underline="True"></asp:Label>
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
                <asp:Label ID="LabTime" runat="server" Font-Bold="True" Font-Overline="False" Font-Size="11pt"
                    Font-Underline="True"></asp:Label></td>
        </tr>
        <tr>
            <td colspan="5">
                <asp:GridView ID="viewSrhRst" runat="server" AutoGenerateColumns="False" BorderStyle="Solid"
                    BorderWidth="3px" CssClass="GridView_table" DataKeyNames="DishId" OnPageIndexChanging="viewSrhRst_PageIndexChanging"
                    OnRowDataBound="viewSrhRst_RowDataBound">
                    <Columns>
                        <asp:TemplateField HeaderText="选择">
                            <EditItemTemplate>
                                <asp:CheckBox ID="CheckBox1" runat="server" />
                            </EditItemTemplate>
                            <ItemStyle CssClass="GridView_item_center" />
                            <HeaderStyle CssClass="GridView_head_grayblue" Width="5%" />
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckBox1" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="DishName" HeaderText="菜名">
                            <ItemStyle CssClass="GridView_item_center" />
                            <HeaderStyle CssClass="GridView_head_grayblue" Width="15%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="DishPrice" DataFormatString="{0:N}" HeaderText="单价" HtmlEncode="False">
                            <ItemStyle CssClass="GridView_item_center" />
                            <HeaderStyle CssClass="GridView_head_grayblue" Width="15%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="TimeName" HeaderText="用餐类型" Visible="False">
                            <HeaderStyle CssClass="GridView_head_grayblue" Width="10%" />
                            <ItemStyle CssClass="GridView_item_left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="ClassName" HeaderText="荤素类别">
                            <HeaderStyle CssClass="GridView_head_grayblue" Width="10%" />
                            <ItemStyle CssClass="GridView_item_center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="KindName" HeaderText="套菜类别">
                            <ItemStyle CssClass="GridView_item_center" />
                            <HeaderStyle CssClass="GridView_head_grayblue" Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="TypeName" HeaderText="菜式类别">
                            <ItemStyle CssClass="GridView_item_center" />
                            <HeaderStyle CssClass="GridView_head_grayblue" Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="DeliveryName" HeaderText="送菜类别">
                            <ItemStyle CssClass="GridView_item_center" />
                            <HeaderStyle CssClass="GridView_head_grayblue" Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="DishId" HeaderText="菜肴编号">
                            <HeaderStyle CssClass="GridView_head_grayblue" Width="10%" />
                            <ItemStyle CssClass="GridView_item_left" />
                        </asp:BoundField>
                    </Columns>
                    <PagerSettings Mode="NumericFirstLast" />
                    <PagerStyle HorizontalAlign="Right" />
                </asp:GridView>
            </td>
        </tr>
    </table>
    <br />
    <table class="table_border_line">
        <tr>
            <td style="text-align: center; height: 22px;">
                <asp:Button ID="save" runat="server" CssClass="button"
                    Text="登 记" Width="102px" OnClick="save_Click" Visible="False"  />&nbsp;</td>
        </tr>
    </table>
    <cc1:ComValidator ID="ComValidator1" runat="server" CheckItems-Capacity="4" Visible="False">
        <cc1:CheckDateAttribute Code="E0034" ControlToValidator="txtDate" DataFormat="yyyy/mm/dd">
            <cc1:ComAbsParamsAttribute Parameter="订餐日期" />
        </cc1:CheckDateAttribute>
        <cc1:CheckRequiredAttribute Code="E0094" ControlToValidator="txtDate">
            <cc1:ComAbsParamsAttribute Parameter="订餐日期" />
        </cc1:CheckRequiredAttribute>
    </cc1:ComValidator>
    <asp:HiddenField ID="hidWeek" runat="server" />
</asp:Content>

